home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / SeqPups / appsrc / drawtree.src / phylip.h < prev    next >
Text File  |  1996-07-05  |  4KB  |  170 lines

  1. #define VERSION "3.54c"
  2.  
  3. #define CHILDAPP  /* dgg, for seqpup use */
  4.  
  5.  
  6. /* machine-specific stuff:
  7.    based on a number of factors in the library stdlib.h, we will try
  8.    to determine what kind of machine/compiler this program is being
  9.    built on.  However, it doesn't always succeed.  However, if you have
  10.    ANSI conforming C, it will probably work.
  11.  
  12.  we will try to figure out machine type
  13.  based on defines in stdio, and compiler-defined things as well.: */
  14.  
  15. #ifdef  GNUDOS
  16. #define DJGPP
  17. #define DOS
  18. #endif
  19.  
  20. #ifdef THINK_C
  21. #define MAC
  22. #endif
  23.  
  24. #include <stdio.h>
  25. #include <stdlib.h>
  26.  
  27. #ifdef __CMS_OPEN
  28. #define CMS
  29. #define EBCDIC true
  30. #define INFILE "infile data"
  31. #define OUTFILE "outfile data"
  32. #define TREEFILE "treefile data"
  33. #define FONTFILE "fontfile data"
  34. #define PLOTFILE "plotfile data"
  35. #define INTREE "intree data"
  36. #define OUTTREE "outtree data"
  37. #else
  38. #define EBCDIC false
  39. #define INFILE "infile"
  40. #define OUTFILE "outfile"
  41. #define TREEFILE "treefile"
  42. #define FONTFILE "fontfile" /* on unix this might be /usr/local/lib/fontfile */
  43. #define PLOTFILE "plotfile"
  44. #define INTREE "intree"
  45. #define OUTTREE "outtree"
  46. #endif
  47.  
  48. #ifdef L_ctermid            /* try and detect for sysV or V7. */
  49. #define SYSTEM_FIVE
  50. #endif
  51.  
  52. #ifdef sequent
  53. #define SYSTEM_FIVE
  54. #endif
  55.  
  56. #ifndef SYSTEM_FIVE
  57. # include<stdlib.h>
  58. # if defined(_STDLIB_H_) || defined(_H_STDLIB) || defined(H_SCCSID) || defined(unix)
  59. # define UNIX
  60. # define MACHINE_TYPE "BSD Unix C"
  61. # endif
  62. #endif
  63.  
  64.  
  65. #ifdef __STDIO_LOADED
  66. #define VMS
  67. #define MACHINE_TYPE "VAX/VMS C"
  68. #define printf vax_printf_is_broken
  69. #define fprintf vax_fprintf_is_broken
  70. void vax_printf_is_broken(const char *fmt,...);
  71. void vax_fprintf_is_broken(FILE *fp,const char *fmt,...);
  72. void vax_tweak_fmt(char *);
  73. #endif
  74.  
  75. #ifdef __WATCOMC__
  76. #define QUICKC
  77. #define WATCOM
  78. #define DOS
  79. #include "graph.h"
  80. #endif
  81. /* watcom-c has graphics library calls that are almost identical to    *
  82.  * quick-c, so the "QUICKC" symbol name stays.                         */
  83.  
  84.  
  85. #ifdef _QC
  86. #define MACHINE_TYPE "MS-DOS / Quick C"
  87. #define QUICKC
  88. #include "graph.h"
  89. #define DOS
  90. #endif
  91.  
  92. #ifdef _DOS_MODE
  93. #define MACHINE_TYPE "MS-DOS /Microsoft C "
  94. #define DOS           /* DOS is  always defined if  on a dos machine */
  95. #define MSC           /* MSC is defined for microsoft C              */
  96. #endif
  97.  
  98. #ifdef __MSDOS__      /* TURBO c compiler, ONLY (no other DOS C compilers) */
  99. #define DOS
  100. #define TURBOC
  101. #include<stdlib.h>
  102. #include<graphics.h>
  103. #endif
  104.  
  105. #ifdef DJGPP          /* DJ's gnu  C/C++ port */
  106. #include<graphics.h>
  107. #endif
  108.  
  109. #ifndef MACHINE_TYPE
  110. #define MACHINE_TYPE "ANSI C"
  111. #endif
  112.  
  113. #ifdef DOS
  114. #define MALLOCRETURN void 
  115. #else
  116. #define MALLOCRETURN void
  117. #endif
  118.  
  119. #ifdef VMS
  120. #define signed /* signed doesn't exist in VMS */
  121. #endif
  122.  
  123. #ifdef DJGPP
  124. #undef MALLOCRETURN
  125. #define MALLOCRETURN void
  126. #endif
  127.  
  128.  
  129. /* includes: */
  130. #ifdef UNIX
  131. #include<strings.h>
  132. #else
  133. #include<string.h>
  134. #endif
  135.  
  136. #include <math.h>
  137. #include <ctype.h>
  138.  
  139. #ifdef MAC
  140. #include "interface.h"
  141. #endif
  142.  
  143. #define FClose(file) if (file) fclose(file) ; file=NULL
  144. #define Malloc(x) mymalloc((long)x)
  145.  
  146. typedef void *Anyptr;
  147. #define Signed     signed
  148. #define Void       void      /* Void f() = procedure */
  149. #define Const     const
  150. #define Volatile  volatile
  151. #define Char        char      /* Characters (not bytes) */
  152. #define Static     static     /* Private global funcs and vars */
  153. #define Local      static     /* Nested functions */
  154.  
  155. typedef unsigned char boolean;
  156.  
  157. # define true    1
  158. # define false   0
  159. #define SETBITS 32
  160.  
  161. #ifdef MAC
  162. MALLOCRETURN    *mymalloc(long);
  163. #else
  164. MALLOCRETURN    *mymalloc();
  165. #endif
  166. int      eof();
  167. int      eoln();
  168. void     memerror();
  169.  
  170.